<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Page for CheckISO7064Mod11_10.js</title>
<script language="javascript" type="text/javascript" src="../CheckISO7064Mod11_10.js"></script>
<script language="javascript" type="text/javascript" src="coretest.js"></script>
<script language="javascript" type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script>
<script language="javascript" type="text/javascript" src="jsunitrunner.js"></script>

</head>
<body>
<h1>ISO7064Mod11_10Check Test</h1>
<script language="javascript" type="text/javascript">

function getCheckInstance() {
   return ISO7064Mod11_10Check;
}

function badTransposition(a, b) {
   return (a == '0' && b == '1') || (a == '3' && b == '4');
}

function testExample() {
   var cd = getCheckInstance();
   assertEquals(5, cd.computeCheck("0794"));
   assertTrue(cd.verify("07945"));
}

var testcases = [testCheck,
       testSingleError,
       testAdjacentTraspositions,
       testExample];
TestRunner.RunTests(testcases);
</script>
</body>
</html>
